package com.one.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @ClassName: PageUtil
 * @Auther: yph
 * @Date: 2022/1/15 22:25
 * @Description: 分页工具类
 */
@Accessors(chain = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "PageUtil",description = "分页")
public class PageUtil<T> {

    /**
     * 当前页
     */
    @ApiModelProperty("当前页")
    private Integer pageNum;

    /**
     * 页面容量
     */
    @ApiModelProperty("页面容量")
    private Integer pageSize;

    /**
     * 总页数
     */
    @ApiModelProperty("总页数")
    private long totalPages;

    /**
     * 总数据量
     */
    @ApiModelProperty("总数据量")
    private long totalRecords;

    /**
     * 数据
     */
    @ApiModelProperty("查询结果")
    private T data;
}
